package com.asen.commons.core.base.controller;

import com.asen.commons.core.base.domain.Generic;
import com.asen.commons.core.base.dto.QueryDto;
import com.asen.commons.core.base.service.GenericService;
import com.asen.commons.core.meta.dao.Condition;

/**
 * 通用controller
 *
 * @author Gary
 * @version 1.0
 * @date 2018-12-10
 */
public abstract class AbstractGenericController<T extends Generic, D, V, S extends GenericService<T>> extends AbstractCoreController<T, D, V, S> {

    @Override
    protected void defaultOrderBy(Condition condition, QueryDto<D> queryDto) throws Exception {
        condition.orderByDesc("createTime");
    }

}
